#include "pch.h"
#include "Buffer.h"
#include "Renderer.h"
#include "GLBuffer.h"
namespace HS {
	std::shared_ptr<VertexBuffer> VertexBuffer::Create(float* vertics, unsigned int size)
	{
		switch (Render::GetAPI())
		{
		case RendererAPI::API::None:
			std::cout << "RendererAPI::None is currently not supported!" << std::endl;
			return nullptr;
		case RendererAPI::API::OpenGL:
			return std::make_shared<GLVertexBuffer>(vertics, size);
		}

		std::cout << "Unknown API" << std::endl;
		return nullptr;
	}

	std::shared_ptr<IndexBuffer> IndexBuffer::Create(unsigned int* indices, unsigned int size)
	{
		switch (Render::GetAPI())
		{
		case RendererAPI::API::None:
			std::cout << "RendererAPI::None is currently not supported!" << std::endl;
			return nullptr;
		case RendererAPI::API::OpenGL:
			return std::make_shared<GLIndexBuffer>(indices, size);
		}

		std::cout << "Unknown API" << std::endl;
		return nullptr;
	}
}